package com.gxp.system.service.impl;

import com.gxp.common.core.text.Convert;
import com.gxp.system.domain.ZkSolvent;
import com.gxp.system.mapper.ZkSolventMapper;
import com.gxp.system.service.IZkSolventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 溶剂Service业务层处理
 * 
 * @author zh
 * @date 2024-03-12
 */
@Service
public class ZkSolventServiceImpl implements IZkSolventService 
{
    @Autowired
    private ZkSolventMapper zkSolventMapper;

    /**
     * 查询溶剂
     * 
     * @param solventId 溶剂主键
     * @return 溶剂
     */
    @Override
    public ZkSolvent selectZkSolventBySolventId(Long solventId)
    {
        return zkSolventMapper.selectZkSolventBySolventId(solventId);
    }

    /**
     * 查询溶剂列表
     * 
     * @param zkSolvent 溶剂
     * @return 溶剂
     */
    @Override
    public List<ZkSolvent> selectZkSolventList(ZkSolvent zkSolvent)
    {
        return zkSolventMapper.selectZkSolventList(zkSolvent);
    }

    /**
     * 新增溶剂
     * 
     * @param zkSolvent 溶剂
     * @return 结果
     */
    @Override
    public int insertZkSolvent(ZkSolvent zkSolvent)
    {
        return zkSolventMapper.insertZkSolvent(zkSolvent);
    }

    /**
     * 修改溶剂
     * 
     * @param zkSolvent 溶剂
     * @return 结果
     */
    @Override
    public int updateZkSolvent(ZkSolvent zkSolvent)
    {
        return zkSolventMapper.updateZkSolvent(zkSolvent);
    }

    /**
     * 批量删除溶剂
     * 
     * @param solventIds 需要删除的溶剂主键
     * @return 结果
     */
    @Override
    public int deleteZkSolventBySolventIds(String solventIds)
    {
        return zkSolventMapper.deleteZkSolventBySolventIds(Convert.toStrArray(solventIds));
    }

    /**
     * 删除溶剂信息
     * 
     * @param solventId 溶剂主键
     * @return 结果
     */
    @Override
    public int deleteZkSolventBySolventId(Long solventId)
    {
        return zkSolventMapper.deleteZkSolventBySolventId(solventId);
    }

    @Override
    public List<ZkSolvent> selectAll() {
        return zkSolventMapper.selectAll();
    }
}
